﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for ETinTuc
/// </summary>
public class ETinTuc
{
	private int maTT;
	private string tieuDe;
	private int loaiTin;
	private string noidung;
	private string hinhAnh;
	private string trangThai;
	private string quantri;
	private string moDau;
	public ETinTuc()
	{}
    public ETinTuc(int maTT, string tieuDe, int loaiTin, string noidung, string hinhAnh, string trangThai, string quantri, string moDau)
	{
	this.maTT = maTT;
	this.tieuDe = tieuDe;
	this.loaiTin = loaiTin;
	this.noidung = noidung;
	this.hinhAnh = hinhAnh;
	this.trangThai = trangThai;
	this.quantri = quantri;
	this.moDau = moDau;
	}
	public int MaTT{
	get { return this.maTT;}
	set { if(value==null) 
		throw new Exception("maTT not allow nullvalue.");
		this.maTT=value;
	}	}
	public string TieuDe{
	get { return this.tieuDe;}
	set { if(value==null) 
		throw new Exception("tieuDe not allow nullvalue.");
		this.tieuDe=value;
	}	}
	public int LoaiTin{
	get { return this.loaiTin;}
	set { if(value==null) 
		throw new Exception("loaiTin not allow nullvalue.");
		this.loaiTin=value;
	}	}
	public string Noidung{
	get { return this.noidung;}
	set {this.noidung=value;}
	}
	public string HinhAnh{
	get { return this.hinhAnh;}
	set {this.hinhAnh=value;}
	}
	public string TrangThai{
	get { return this.trangThai;}
	set {this.trangThai=value;}
	}
	public string Quantri{
	get { return this.quantri;}
	set {this.quantri=value;}
	}
	public string MoDau{
	get { return this.moDau;}
	set {this.moDau=value;}
	}
	public override string ToString(){
	return this.maTT+"; "+this.tieuDe+"; "+this.loaiTin+"; "+this.noidung+"; "+this.hinhAnh+"; "+this.trangThai+"; "+this.quantri+"; "+this.moDau+"; ";
	}
	public override bool Equals(Object obj)
	{
        ETinTuc me = (ETinTuc)obj;
	bool ret=this.MaTT.Equals(me.MaTT);
	return ret;
	}
	public override int GetHashCode()
	{
	    return this.MaTT.GetHashCode();
	}


}